package com.bss.model;

// Generated Oct 27, 2011 10:37:49 PM by Hibernate Tools 3.3.0.GA

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.bss.AbstractNamedEntity;

/**
 * Bedtype generated by hbm2java
 */
@Entity
@Table(name = "bedtype")
public class BedType extends AbstractNamedEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2305101172322875326L;
	private int id;
	private String name;
	private Set<Bed> beds = new HashSet<Bed>(0);

	public BedType() {
	}

	public BedType(final int id) {
		this.id = id;
	}

	@Id
	@Column(name = "id", unique = true, nullable = false)
	@GeneratedValue(strategy = GenerationType.AUTO)
	public Integer getId() {
		return this.id;
	}

	@Override
	public void setId(final int id) {
		this.id = id;
	}

	@Column(name = "name", length = 20)
	public String getName() {
		return this.name;
	}

	public void setName(final String name) {
		this.name = name;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "bedType")
	public Set<Bed> getBeds() {
		return this.beds;
	}

	public void setBeds(final Set<Bed> beds) {
		this.beds = beds;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "date", length = 19)
	public Date getDate() {
		return this.date;
	}
}
